import {createRouter, createWebHistory} from 'vue-router'
import HomeView from '../views/HomeView.vue'
import LoginView from '../views/LoginView.vue'
import RegisterView from '../views/RegisterView.vue'
import JimView from '../views/JimView.vue'
import PolicyView from '../views/PolicyView.vue'

const router = createRouter({
    history: createWebHistory(import.meta.env.BASE_URL),
    routes: [
        {
            path: '/',
            name: 'home',
            component: HomeView,
        },
        {
            path: '/login',
            name: 'login',
            component: LoginView,
        },
        {
            path: '/register',
            name: 'Register',
            component: RegisterView,
        },
        {
            path: '/jim',
            name: 'Jim',
            component: JimView,
        },
        {
            path: '/policy',
            name: 'Policy',
            component: PolicyView,
        },
    ],
})
router.beforeEach(async (to, from, next) => {
    // NProgress.configure({showSpinner: false});
    next();
});
export default router
